import React, { useCallback } from 'react';
import { Card, Breadcrumb, Layout, Form, Input, Button, Row, Col, Space } from 'antd';
import { PlusOutlined } from '@ant-design/icons';

function AuthsSearchTool(props, ref) {
    const [form] = Form.useForm();

    return (
        <Form
            form={form}
            name="auth_search"
            className="ant-advanced-search-form"
            onFinish={(values) => { props.handleSearchFormFinish(values) }}>
            <Row gutter={24}>
                <Col span={8}>
                    <Form.Item name="id" label="ID">
                        <Input />
                    </Form.Item>
                </Col>
                <Col span={8}>
                    <Form.Item name="name" label="名称">
                        <Input />
                    </Form.Item>
                </Col>
                <Col span={8} style={{ textAlign: "right" }}>
                    <Form.Item>
                        <Space>
                            <Button type="primary" htmlType="submit">
                                查询
                            </Button>
                            <Button htmlType='reset' onClick={() => { form.resetFields() }}>
                                重置
                            </Button>
                        </Space>
                    </Form.Item>
                </Col>
            </Row>
        </Form>
    );
}

export default AuthsSearchTool;